package com.until.response;

import javax.servlet.http.HttpServletResponse;

/**
 * 定义基础的返回值类
 * 定义 response-message & response-code的模型类
 * @author AdminUser
 */
public class AbsResponseBody {
    /**
     *用户操作成功，200返回值
     */
    public static final RestfulCode.CodeSatCode USER_OPERATION_SUCCEEDED = new RestfulCode.CodeSatCode(String.valueOf(HttpServletResponse.SC_OK),"用户操作成功");
    /**
     * 用户操作失败,202返回值
     */
    public static final RestfulCode.CodeSatCode USER_ACTION_FAILED = new RestfulCode.CodeSatCode(String.valueOf(HttpServletResponse.SC_NON_AUTHORITATIVE_INFORMATION),"用户操作失败，请检查用户参数后重试,请联尽快联系管理员");
    /**
     * 定义空指针异常
     */
    public static final RestfulCode.CodeSatCode NULL_POINTER_EXCEPTION = new RestfulCode.CodeSatCode(String.valueOf(HttpServletResponse.SC_BAD_REQUEST),"传递参数错误，请检查参数参数");
    /**
     * 文件没有占到的异常
     */
    public static final RestfulCode.CodeSatCode NOT_FOUND_EXAMPLE =new RestfulCode.CodeSatCode(String.valueOf(HttpServletResponse.SC_NOT_FOUND),"资源丢失或者已经删除");
    /**
     * 定义未知错误
     */
    public static final RestfulCode.CodeSatCode INTERNAL_SERVER_ERROR = new RestfulCode.CodeSatCode(String.valueOf(HttpServletResponse.SC_NOT_ACCEPTABLE),"服务器无法根据客户端请求的内容特性完成请求,请稍后再试");
}
